import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/login.vue'
import Order from '../views/order.vue'
import Me from '../views/me.vue'
import Address from '../components/address.vue'
import Name from '../components/name.vue'
import Password from '../components/password.vue'
import changedress from '../components/changedress.vue'
import phone from '../components/phone.vue'
import dress from '../views/dress.vue'
import newaddress from '../views/newaddress'
import cityselect from "../views/cityselect";
import sureorder from "../components/sureorder";
import foodlist from "../components/foodlist";
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
    {
    path: '/order',
    name: 'order',
    component: Order
  },
  {
    path: '/me',
    name: 'me',
    component: Me
  },
  {
    path: '/address',
    name: 'Address',
    component: Address
  },
  {
    path: '/name',
    name: 'name',
    component: Name
  },
  {
    path: '/pwd',
    name: 'Password',
    component: Password
  },
  {
    path: '/phone',
    name: 'phone',
    component: phone
  },
  {
    path: '/dress',
    name: 'dress',
    component: dress
  },
  {
    path: '/newaddress',
    name: 'newaddress',
    component: newaddress
  },
  {
    path: '/cityselect',
    name: 'cityselect',
    component: cityselect
  },
  {
    path: '/changedress',
    name: 'changedress',
    component: changedress
  },
  {
    path: '/sureorder',
    name: 'sureorder',
    component: sureorder
  },
  {
    path: '/foodlist',
    name: 'foodlist',
    component: foodlist
  },
]

const router = new VueRouter({
  routes
})

export default router
